package program03;

import java.util.Set;

/**
 * @version 1.0
 * @since:
 * @ClassName:CallSetMeal
 * @author: Li Jiahui
 * @date: 2021-01-16 23:39
 * 通话套餐类 特征：通话时长、短信条数、每月资费 行为: 显示所有套餐信息
 *    CallSetMeal为通话套餐类的实现
 */
public class CallSetMeal extends SetMeal{
    //1.自定义通话套餐类成员变量
    private int callTime;
    private int smsCount;
    //private double monthFees;
    //3.自定义无参和有参的构造方法
    public CallSetMeal(){}
    public CallSetMeal(int callTime, int smsCount, double monthFees) {
        super(monthFees);
        setCallTime(callTime);
        setSmsCount(smsCount);
    }
    //2.提供公有的get和set方法
    public int getCallTime() {
        return callTime;
    }
    public void setCallTime(int callTime) {
        this.callTime = callTime;
    }
    public int getSmsCount() {
        return smsCount;
    }
    public void setSmsCount(int smsCount) {
        this.smsCount = smsCount;
    }
    //4.自定义显示所有套餐信息的成员方法
    @Override
    public void show(){
        System.out.println("通话套餐信息： 其中通话时长为：" + this.callTime + "分钟,短信条数为：" + this.smsCount + "条。每月费用为：" + monthFees +"元");
        /*super(monthFees);*/
    }
}
